package com.example.demo.mapper;

import com.example.demo.entity.ArtInfo;
import com.example.demo.entity.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArtMapper {
    List<ArtInfo> getMyArt(@Param("uid") Integer uid);

    ArtInfo getArtById(@Param("aid") Integer aid);

    Integer updateArt(@Param("aid") Integer aid, @Param("uid") Integer uid,
                      @Param("title") String title, @Param("content") String content);

    Integer insert(@Param("uid")Integer uid,
                    @Param("title") String title,
                    @Param("content") String content);

    Integer delete(@Param("uid") Integer uid,@Param("id") Integer id);
    List<ArtInfo> getAllList(@Param("pageSize")Integer pageSize,@Param("offset")Integer offset);
    Integer getPages(@Param("psize") Integer psize);

}
